<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>标签管理</title>
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="stylesheet" href="./css/font.css">
    <link rel="stylesheet" href="./css/login.css">
    <link rel="stylesheet" href="./css/xadmin.css">
    <link rel="stylesheet" href="http://at.alicdn.com/t/font_2817347_mh9aj0h1dfb.css">
    <link rel="stylesheet" href="./css/tag.css">
    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
</head>

<body>
    <!-- 卡片区域 -->
    <div class="layui-card">
        <div class="layui-card-body">
            <!-- 表单区域 -->
            <form class="layui-form" id="form-search">
                <!-- 隐藏域，保存 Id 的值 -->
                <input type="hidden" name="id">
                <div class="layui-form-item">
                    <label class="layui-form-label">标签名称</label>
                    <div class="layui-input-inline ydd-iuptag">
                        <input type="text" name="tagname" placeholder="请输入标签名称" autocomplete="off" class="layui-input" id="iup-tag">
                        <button class="layui-btn layui-btn-normal" lay-submit lay-filter="formDemo" id="btn-inquire"><span class="iconfont icon-search iconft"></span>
                            查询</button>
                        <div class="layui-form-item layui-inline">
                            <button type="reset" class="layui-btn layui-btn-primary" id="btn-reset"> <span
                                    class="iconfont icon-refresh iconft"></span>重置</button>
                        </div>
                    </div>
                </div>
            </form>
            <!-- 按钮区域 -->
            <div class="action-box">
                <div class="btn-left">
                    <button type="button" class="layui-btn layui-btn-sm btn-add" id="btn-add"> <span
                            class="iconfont icon-tianjia"></span> 新增</button>
                    <button type="button" class="layui-btn layui-btn-sm btn-derive" id="btn-derive">
                        <span class="iconfont icon-icon_detail_download"></span> 导出</button>
                </div>
                <div class="data-v">
                    <button type="button" class="is-pain" id="btn-upoverturn"><span
                            class="iconfont icon-shouqi icon-pain"></span></button>
                    <button type="button" class="is-pain" id="btn-btoverturn"><span
                            class="iconfont icon-zhankai1 icon-pain"></span></button>
                    <button type="reset" class="is-pain is-circle" id="btn-refresh"><span
                            class="iconfont icon-refresh icon-pain"></span></button>
                    <button type="button" class="is-pain" id="person"><span
                            class="iconfont icon-Microsoft icon-pain"></span></button>
                    <div class="hibox">
                        <div class="hiup">
                            <i class="iconfont icon-danyao icon-hi"></i> <input type="checkbox" checked name="" id="sp-id" class="ipt-clicka ipt-click "> <span>ID</span>
                        </div>
                        <div class="hibt">
                            <i class="iconfont icon-danyao icon-hi"></i> <input type="checkbox" checked name="" id="sp-name" class="ipt-clickb ipt-click sp-name"> <span>标签名称</span>
                        </div>
                    </div>
                </div>
            </div>
            <!-- 表格区域 -->
            <table class="layui-table">
                <colgroup>
                    <col width="48px" !important>
                    <col>
                    <col>
                    <col>
                </colgroup>
                <thead>
                    <tr>
                        <th>#</th>
                        <th id="tab-id" class="tab-id">ID</th>
                        <th id="tab-name" class="tab-name">标签名称</th>
                        <th id="operation">操作</th>
                    </tr>
                </thead>
                <tbody>

                </tbody>
            </table>
            <!-- 分页区域 -->
            <div id="pageBox"></div>
        </div>
    </div>

    <script type="text/html" id="tagTally">
        {{each data}}
        <tr>
            <td>{{$index+1}}</td>
            <!-- <td class="tab-id" id="tab-id1">{{$value.id}}</td> -->
            <td class="tab-id">{{0?$value.tagname:$value.id}}</td>
            <td class="tab-name">{{1?$value.tagname:$value.id}}</td>
            <!-- <td class="tab-name">{{flag}}</td> -->
            <td class="operation">
                <button type="button" class="is-paing is-paing-blue btn-edit" data-id="{{$value.id}}"><span class="iconfont icon-icon-18 icon-paing"></span></button>
                <button type="button" class="is-paing is-paing-red btn-delete" data-id="{{$value.id}}"><span
                            class="iconfont icon-icon-16 icon-paing"></span></button>
            </td>
        </tr>{{/each}}
    </script>

    <!-- 添加分类的弹出层 -->
    <script type="text/html" id="dialog-add">
        <form class="layui-form" id="form-add">
            <!-- 隐藏域，保存 Id 的值 -->
            <!-- <input type="hidden" name="id"> -->
            <div class="layui-form-item">
                <label class="layui-form-label label-list">标签名称</label>
                <div class="layui-input-block">
                    <input type="text" name="tagname" required placeholder="请输入标签名称" autocomplete="off" class="layui-input layui-input-inline iptlist">
                </div>
            </div>
            <div class="layui-form-item btn-rig">
                <div class="layui-input-block">
                    <button type="button" lay-submit class="layui-btn layui-btn-primary cancel" id="cancle">取消</button>
                    <button class="layui-btn" lay-submit lay-filter="formDemo">确认添加</button>
                </div>
            </div>
        </form>
    </script>

    <!-- 修改分类的弹出层 -->
    <script type="text/html" id="dialog-edit">
        <form class="layui-form" id="form-edit" lay-filter="form-edit">
            <!-- 隐藏域，保存 Id 的值 -->
            <input type="hidden" name="id">
            <div class="layui-form-item">
                <label class="layui-form-label label-list">标签名称</label>
                <div class="layui-input-block">
                    <input type="text" name="tagname" required placeholder="请输入标签名称" autocomplete="off" class="layui-input layui-input-inline iptlist">
                </div>
            </div>
            <div class="layui-form-item btn-rig">
                <div class="layui-input-block">
                    <button type="button" lay-submit class="layui-btn layui-btn-primary cancel" id="cancle">取消</button>
                    <button class="layui-btn" lay-submit lay-filter="formDemo">确认修改</button>
                </div>
            </div>
        </form>
    </script>

    <!-- <script type="text/html" id="tpl-cate">
        <option value="">请选择分类</option>
        {{each data}}
        <option value="{{$value.id}}">{{$value.cate_name}}</option>
        {{/each}}
    </script> -->

    <script src="./lib/layui/layui.js"></script>
    <script src="./lib/layui/layui.all.js" charset="utf-8"></script>
    <script src="./js/template-web.js"></script>
    <script src="./js/base.js"></script>
    <script src="./js/tag.js"></script>
</body>

</html>